package ui;


import beans.ErrorPayload;
import beans.OrdinaryPayload;
import beans.TimeDelayPayload;

import java.sql.Time;
import java.util.List;

/**
 * Created by shuaidong on 2017/7/2.
 */
public class Model {
    private boolean switchSqlinject;
    private boolean paramInUrl;
    private boolean paramInCookies;
    private boolean paramInBody;
    private List<OrdinaryPayload> ordinaryPayloadList;
    private List<ErrorPayload> errorPayloadList;
    private List<TimeDelayPayload> timeDelayPayloadList;
    private   String hostBlackList;
    private  String fileSuffixBlackList;
    private  String hostWhiteList;
    private  String fileWhiteList;

    private static Model model = null;

    public static Model getInstanceModel(){
        if (null == model){
            model = new Model();
        }
        return model;
    }


    public Model() {
        switchSqlinject = false;
        paramInUrl = true;
        paramInCookies  = true;
        paramInBody = true;
        hostBlackList = "$*.gstatic.com|$*.baidu.com|$*.chinaz.com";
        fileSuffixBlackList = "css|jpg|png|ico|js|gif";
        hostWhiteList = "";
        fileWhiteList = "";
        ordinaryPayloadList = OrdinaryPayload.getInstanceOrdinaryPayloadList();
        errorPayloadList  = ErrorPayload.getErrorPayloadListInstance();
        timeDelayPayloadList = TimeDelayPayload.getTimeDelayPayloadInstance();


    }

    public boolean isSwitchSqlinject() {
        return switchSqlinject;
    }

    public void setSwitchSqlinject(boolean switchSqlinject) {
        this.switchSqlinject = switchSqlinject;
    }

    public boolean isParamInUrl() {
        return paramInUrl;
    }

    public void setParamInUrl(boolean paramInUrl) {
        this.paramInUrl = paramInUrl;
    }

    public boolean isParamInCookies() {
        return paramInCookies;
    }

    public void setParamInCookies(boolean paramInCookies) {
        this.paramInCookies = paramInCookies;
    }

    public boolean isParamInBody() {
        return paramInBody;
    }

    public void setParamInBody(boolean paramInBody) {
        this.paramInBody = paramInBody;
    }

    public List<OrdinaryPayload> getOrdinaryPayloadList() {
        return ordinaryPayloadList;
    }

    public void setOrdinaryPayloadList(List<OrdinaryPayload> ordinaryPayloadList) {
        this.ordinaryPayloadList = ordinaryPayloadList;
    }

    public String getHostBlackList() {
        return hostBlackList;
    }

    public void setHostBlackList(String hostBlackList) {
        this.hostBlackList = hostBlackList;
    }

    public String getFileSuffixBlackList() {
        return fileSuffixBlackList;
    }

    public void setFileSuffixBlackList(String fileSuffixBlackList) {
        this.fileSuffixBlackList = fileSuffixBlackList;
    }

    public String getHostWhiteList() {
        return hostWhiteList;
    }

    public void setHostWhiteList(String hostWhiteList) {
        this.hostWhiteList = hostWhiteList;
    }

    public String getFileWhiteList() {
        return fileWhiteList;
    }

    public void setFileWhiteList(String fileWhiteList) {
        this.fileWhiteList = fileWhiteList;
    }

    public List<ErrorPayload> getErrorPayloadList() {
        return errorPayloadList;
    }

    public void setErrorPayloadList(List<ErrorPayload> errorPayloadList) {
        this.errorPayloadList = errorPayloadList;
    }

    public List<TimeDelayPayload> getTimeDelayPayloadList() {
        return timeDelayPayloadList;
    }

    public void setTimeDelayPayloadList(List<TimeDelayPayload> timeDelayPayloadList) {
        this.timeDelayPayloadList = timeDelayPayloadList;
    }
}
